<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>立体呈现</title>
  <style>
    .cube {
      width: 200px;
      height: 200px;
      margin: 100px auto;
      /* background-color: pink; */
      transition: all 2s;

      transform-style: preserve-3d;
      position: relative;
      /* transform: rotateY(89deg); */
    }
    .cube div {
      width: 200px;
      height: 200px;

      position: absolute;
      left: 0;
      top: 0;
    }
    .front {
      background-color: orange;

      transform: translateZ(100px);
    }
    .back {
      background-color: green;

      transform: translateZ(-100px);
    }
    .cube:hover {
      transform: rotateY(90deg);
    }
  </style>
</head>
<body>
  <div class="cube">
    <div class="front">前面</div>
    <div class="back">后面</div>
  </div>
</body>
</html>